package cn.ruituo.web;

import cn.ruituo.entity.Grade2;
import cn.ruituo.service.GradeService;
import cn.ruituo.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
@CrossOrigin
@RestController//Controller resonseBody
@RequestMapping(value = "grade",produces = "application/json;charset=utf-8")
public class GradeController {
    @Autowired
    private GradeService gradeService;

    @GetMapping("findALL")
    public Result findALL(){
        return Result.success(gradeService.findALL());
    }
}
